/**
 * Created by cb-dlhis on 17-1-18.
 */

import { GET_INFO, PUT_INFO } from './Domain';

export function getOrdersInfoAPI (cb) {
  return GET_INFO('/admin/hotel/order/history', cb);
}

export function getOrderInfoByParamsAPI (params, cb) {
  var url='/admin/hotel/order/history?';
  if(params.pageNo) {
    url += 'page=' + params.pageNo
  }
  if (params.status) {
    url += '&status='+ params.status
  }
  if (params.hotelId) {
    url += '&hotelId='+ params.hotelId
  }
  return GET_INFO(url, cb);
}
